import request from '@/utils/request'

// 秒杀列表
export function fetchSeckillGoods(params={}) {
  return request('/Amaidan-Goods-Web/goods/resGoodsSeckill/selectSeckillGoods', {
    method: 'POST',
    data: params
  })
}

// 秒杀编辑
export function updateSeckillGoods(params={}) {
  return request('/Amaidan-Goods-Web/goods/resGoodsSeckill/updateSeckillGoods', {
    method: 'POST',
    data: params
  })
}

// 秒杀新增
export function addSeckillGoods(params={}) {
  return request('/Amaidan-Goods-Web/goods/resGoodsSeckill/addSeckillGoods', {
    method: 'POST',
    data: params
  })
}

// 秒杀删除
export function deleteSeckillGoods(params={}) {
  return request('/Amaidan-Goods-Web/goods/resGoodsSeckill/deleteSeckillGoods', {
    method: 'POST',
    data: params
  })
}

// 获取该条秒杀的详情信息
export function fetchSeckillInfoById(params={}) {
  return request('/Amaidan-Goods-Web/goods/resGoodsSeckill/selectSeckillInfoById', {
    method: 'POST',
    data: params
  })
}

export function selectGoodsByIdOrNormId(params={}) {
  return request('/Amaidan-Goods-Web/resGoods/change/selectGoodsByIdOrNormId', {
    method: 'POST',
    data: params
  })
}


// 商家推荐开关
export function changeStatus_1(params={}) {
  return request('/Amaidan-Goods-Web/goods/resGoodsSeckill/changeSupplierTopStatus', {
    method: 'POST',
    data: params
  })
}

// 门店推荐开关
export function changeStatus_2(params={}) {
  return request('/Amaidan-Goods-Web/goods/resGoodsSeckill/changeIsTopStatus', {
    method: 'POST',
    data: params
  })
}
